#ifndef MYDELEGATE_H
#define MYDELEGATE_H

#include <QObject>
#include <QItemDelegate>
#include <QModelIndex>
#include <QSize>
#include <QSpinBox>

class MyDelegate : public QItemDelegate
{
    Q_OBJECT
public:
    explicit MyDelegate(QObject *parent = 0);
    QWidget* createEditor(QWidget *parent,
                         const QStyleOptionViewItem &option,
                         const QModelIndex &index) const;
    void setEditorData(QWidget* editor, QModelIndex& index) const;
    void setModelData(QWidget* editor, QAbstractItemModel* model,
                      const QModelIndex& index)const;
    void updateEditorGeometry(QWidget * editor,
                              const QStyleOptionViewItem & option,
                              const QModelIndex & index) const;
    ~MyDelegate();

signals:

public slots:
};

#endif // MYDELEGATE_H
